package cn.medemede.action;

import cn.medemede.model.TUserEntity;
import cn.medemede.service.TUserService;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.ModelDriven;

public class TUserAction extends ActionSupport implements ModelDriven<TUserEntity> {

    private TUserEntity tUser=new TUserEntity();

    public TUserEntity getModel() {
        return this.tUser;
    }

    private TUserService tUserService;
    public void settUserService(TUserService tUserService){
        this.tUserService=tUserService;
    }

    public String add(){
        this.tUserService.saverTUser(tUser);
        return "add";
    }
}
